<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="com.lmpop.trade.ti_payment.*" %>
<%@ page import="java.util.*" %>
<% 
	String pay_id="";
	if(request.getParameter("pay_id")!=null) pay_id = request.getParameter("pay_id");
	Ti_paymentInfo ti_paymentInfo = new Ti_paymentInfo();
	List list = ti_paymentInfo.getListByPk(pay_id);
	Hashtable map = new Hashtable();
	if(list!=null && list.size()>0) map = (Hashtable)list.get(0);

	String pay_code="",pay_name="",pay_desc="",pay_account="",passwd="",hand_fare="",enabled="",user_id="",in_date="",pay_email="";
	if(map.get("pay_code")!=null) pay_code = map.get("pay_code").toString();
	if(map.get("pay_name")!=null) pay_name = map.get("pay_name").toString();
	if(map.get("pay_desc")!=null) pay_desc = map.get("pay_desc").toString();
	if(map.get("pay_account")!=null) pay_account = map.get("pay_account").toString();
	if(map.get("passwd")!=null) passwd = map.get("passwd").toString();
	if(map.get("hand_fare")!=null) hand_fare = map.get("hand_fare").toString();
	if(map.get("enabled")!=null) enabled = map.get("enabled").toString();
	if(map.get("user_id")!=null) user_id = map.get("user_id").toString();
	if(map.get("pay_email")!=null) pay_email = map.get("pay_email").toString();

	String s_pay_name = "";
	if(request.getParameter("s_pay_name")!=null && !request.getParameter("s_pay_name").equals("")){
		s_pay_name = new String(request.getParameter("s_pay_name").trim().getBytes("utf-8"));
	}
	String s_enabled = "";
	if(request.getParameter("s_enabled")!=null && !request.getParameter("s_enabled").equals("")){
		s_enabled = request.getParameter("s_enabled");
	}
	String iStart = "0";
	if(request.getParameter("iStart")!=null && !request.getParameter("iStart").equals("")){
		iStart = request.getParameter("iStart");
	}

	in_date=new Date().toLocaleString();

	String url = "/program/admin/payment/index.jsp?s_pay_name="+s_pay_name+"&s_enabled="+s_enabled+"&iStart="+iStart;

%>
<html>
<head> 
    <title>修改支付方式</title>
	<link href="/program/admin/index/css/style.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="payment.js"></script>
</head>
<body>

	<h1>修改支付方式</h1>
	
	<!--
	<table width="100%" align="center" cellpadding="0" cellspacing="0" class="dl_so">
        <tr>
          <td width="9%" align="center"><img src="/program/admin/index/images/ban_01.gif" /></td>
          <td width="91%" align="left">
		  <h4>-----------------</h4>
		  <span>1----------------。</span><br/>
		  <span>2----------------。</span>
		  </td>
        </tr>
      </table>
      <br/>
	  -->
	
	
	<form action="/doTradeReg.do" method="post" name="addForm">
	<table width="100%" cellpadding="0" cellspacing="1" border="0" class="listtab">

		<tr>
			<td align="right" width="15%">
				支付方式名称<font color="red">*</font>
			</td>
			<td align="left" width="20%"><input name="pay_name" id="pay_name" type="text" value="<%=pay_name %>"/></td>
			<td align="right" width="15%">
				支付方式编码<font color="red">*</font>
			</td>
			<td><input name="pay_code" id="pay_code" type="text" value="<%=pay_code %>"/></td>			
		</tr>
	
		
		<tr>
			<td align="right" width="15%">
				商户帐号<font color="red">*</font>
			</td>
			<td align="left" width="20%"><input name="pay_account" id="pay_account" type="text" value="<%=pay_account %>"/></td>
			<td align="right" width="15%">
				商户密钥<font color="red">*</font>
			</td>
			<td><input name="passwd" id="passwd" type="text" value="<%=passwd %>"/></td>			
		</tr>
		
		<tr>
			<td align="right" width="15%">
				启用状态:
			</td>
			<td align="left" width="20%"><input name="enabled" id="enabled" type="radio" value="0" <%if(enabled.equals("0"))out.print("checked");%>/>启用
					<input name="enabled" id="enabled" type="radio" value="1" <%if(enabled.equals("1"))out.print("checked");%>/>禁用
				</td>	
			<td align="right" width="15%">								
				支付手续费:
			</td>
			<td><input name="hand_fare" id="hand_fare" maxLength="2" type="text" value="<%=hand_fare%>" onKeyUp="if(!/^[0-9]*$/.test(this.value))this.value=''"/><font color="red">&nbsp;&nbsp;注:默认为0,如为1则手续费为1%</font></td>
	
		</tr>
		<tr>
			<td align="right" width="15%">
				收款帐户:
			</td>
			<td align="left" colspan="3">
			<input name="pay_email" id="pay_email" type="text" size="50" value="<%=pay_email%>" />
			</td>	
		</tr>			
		<tr>
			<td align="right" width="15%">
				支付方式描述:
			</td>
			<td colspan="3"><textarea name="pay_desc" id="pay_desc" rows="6" cols="50"/><%=pay_desc %></textarea></td>
		</tr>
		
		<input name="user_id" id="user_id" value="<%=user_id %>" type="hidden" />
		<input name="in_date" id="in_date" value="<%=in_date %>" type="hidden" />	
		<input type="hidden" name="jumpurl" value="<%=url%>" />
	</table>
	
	<table width="100%" cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td align="center">
				<input type="hidden" name="bpm_id" value="1867" />
	  			<input type="hidden" name="pay_id" value="<%=pay_id %>" />
				<input type="submit" class="buttoncss" name="tradeSub" value="提交" onclick="return checkInfo();"/>&nbsp;&nbsp;
				<input type="button" class="buttoncss" name="tradeRut" value="返回" onclick="window.location.href='<%=url%>';"/>
			</td>
		</tr>
	</table>
	</form>
</body>

</html>
